Skip to content

feat(inbox): render expandable inbox report card under initial prompt#2556

Closed
rafaeelaudibert wants to merge 1 commit into
mainfrom
posthog-code/inbox-report-card
Closed

feat(inbox): render expandable inbox report card under initial prompt#2556
rafaeelaudibert wants to merge 1 commit into
mainfrom
posthog-code/inbox-report-card

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

Summary

When a task is associated with a PostHog inbox report (task.signal_report), the conversation now renders an expandable inbox-report card directly under the initial prompt. You can read the report inline — title, status, summary, priority/actionability — instead of jumping out to the inbox view to read more about it.

What changed

New component — InboxReportCard.tsx

  • Fetches the report via the existing useInboxReportById hook (same TanStack Query cache the inbox uses, so it stays in sync — no new data plumbing).
  • Collapsed: compact card with a tray icon, report title, and status badge.
  • Expanded: the researched summary (SignalReportSummaryMarkdown), priority + actionability badges, and an "Open in inbox" link that resets filters, navigates to the inbox, and selects the report (mirrors the deep-link open path, reusing the warm cache for the detail pane).
  • Shows a subtle loading row while fetching; renders nothing if the report isn't accessible.

Wiring (mirrors the existing slackThreadUrl pattern)

  • UserMessage.tsx — added an optional signalReportId prop; when present it renders <InboxReportCard> below the message body.
  • ConversationView.tsx — passes task.signal_report to UserMessage for the first user message only.

Notes

  • The existing [inbox item](posthog-code://…) deep link inside the agent's prompt text is kept — it's part of the prompt the agent reads; the card is an additive UI affordance.
  • The card appears on the live/suspended conversation view, not the transient pre-connection PendingChatView.

Verification

  • pnpm --filter code typecheck passes clean.
  • biome check passes.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit b2afe17.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(inbox): render expandable inbox rep..." | Re-trigger Greptile

@rafaeelaudibert rafaeelaudibert added the Stamphog This will request an autostamp by stamphog on small changes label Jun 9, 2026 — with Graphite App
@rafaeelaudibert rafaeelaudibert requested a review from a team June 9, 2026 22:50

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review agent failed after 3 attempts — needs human review.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jun 9, 2026
When a task is associated with a PostHog inbox report (task.signal_report),
the conversation now renders an expandable report card directly under the
initial prompt, so the report can be read inline instead of navigating away
to the inbox view.

- New InboxReportCard component fetches the report via the existing
  useInboxReportById hook (shared query cache, stays in sync). Collapsed
  shows title + status badge; expanded shows the researched summary,
  priority/actionability badges, and an "Open in inbox" action.
- UserMessage gains an optional signalReportId prop that renders the card
  below the message body, mirroring the existing slackThreadUrl pattern.
- ConversationView passes task.signal_report to the first user message only.

Rebased onto main to resolve conflicts from the apps/code/src/renderer →
packages/ui feature relocation; component now lives under packages/ui.

Generated-By: PostHog Code
Task-Id: c0568add-708f-41eb-a334-563d52b70afa
@rafaeelaudibert rafaeelaudibert force-pushed the posthog-code/inbox-report-card branch from 6fa71a2 to 77372d7 Compare June 16, 2026 04:04

Copy link
Copy Markdown
Member Author

Since you seem to enjoy my PRs @andrewm4894, what do you think of this one? :)

@rafaeelaudibert rafaeelaudibert force-pushed the posthog-code/inbox-report-card branch from 77372d7 to b2afe17 Compare June 25, 2026 23:14

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant